﻿<UserControl x:Class="CH14_Sample1.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:data ="clr-namespace:CH14_Sample1.Data"
    Width="400" Height="300">
    <UserControl.Resources>
        <data:TimeSeriesBoundData x:Key="TSD"></data:TimeSeriesBoundData>
        <data:ToDoubleConverter x:Key="dblConverter"></data:ToDoubleConverter>
    </UserControl.Resources>
    <Canvas x:Name="LayoutRoot" Background="White">
        <TextBox Canvas.Top="0" x:Name="txtInput" Text="{Binding Source={StaticResource TSD}, Path=open, Mode=TwoWay, Converter={StaticResource dblConverter}}"></TextBox>
        <TextBlock Canvas.Top="20" x:Name="txtView" Text="{Binding Source={StaticResource TSD}, Path=open, Mode=OneWay}"></TextBlock>
    </Canvas>
</UserControl>
